package com.loan.system.create.service.impl;

import com.loan.common.utils.DateUtils;
import com.loan.system.create.domain.AssistPdfSearchZfbBase;
import com.loan.system.create.mapper.AssistPdfSearchZfbBaseMapper;
import com.loan.system.create.service.IAssistPdfSearchZfbBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ZFB数据Service业务层处理
 *
 * @author Sophia
 * @date 2024-10-11
 */
@Service
public class AssistPdfSearchZfbBaseServiceImpl implements IAssistPdfSearchZfbBaseService {
    @Autowired
    private AssistPdfSearchZfbBaseMapper assistPdfSearchZfbBaseMapper;

    /**
     * 查询ZFB数据
     *
     * @param id ZFB数据主键
     * @return ZFB数据
     */
    @Override
    public AssistPdfSearchZfbBase selectAssistPdfSearchZfbBaseById(Long id) {
        return assistPdfSearchZfbBaseMapper.selectAssistPdfSearchZfbBaseById(id);
    }

    /**
     * 查询ZFB数据列表
     *
     * @param assistPdfSearchZfbBase ZFB数据
     * @return ZFB数据
     */
    @Override
    public List<AssistPdfSearchZfbBase> selectAssistPdfSearchZfbBaseList(AssistPdfSearchZfbBase assistPdfSearchZfbBase) {
        return assistPdfSearchZfbBaseMapper.selectAssistPdfSearchZfbBaseList(assistPdfSearchZfbBase);
    }

    /**
     * 新增ZFB数据
     *
     * @param assistPdfSearchZfbBase ZFB数据
     * @return 结果
     */
    @Override
    public int insertAssistPdfSearchZfbBase(AssistPdfSearchZfbBase assistPdfSearchZfbBase) {
        assistPdfSearchZfbBase.setCreateTime(DateUtils.getNowDate());
        return assistPdfSearchZfbBaseMapper.insertAssistPdfSearchZfbBase(assistPdfSearchZfbBase);
    }

    /**
     * 修改ZFB数据
     *
     * @param assistPdfSearchZfbBase ZFB数据
     * @return 结果
     */
    @Override
    public int updateAssistPdfSearchZfbBase(AssistPdfSearchZfbBase assistPdfSearchZfbBase) {
        assistPdfSearchZfbBase.setUpdateTime(DateUtils.getNowDate());
        return assistPdfSearchZfbBaseMapper.updateAssistPdfSearchZfbBase(assistPdfSearchZfbBase);
    }

    /**
     * 批量删除ZFB数据
     *
     * @param ids 需要删除的ZFB数据主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfSearchZfbBaseByIds(Long[] ids) {
        return assistPdfSearchZfbBaseMapper.deleteAssistPdfSearchZfbBaseByIds(ids);
    }

    /**
     * 删除ZFB数据信息
     *
     * @param id ZFB数据主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfSearchZfbBaseById(Long id) {
        return assistPdfSearchZfbBaseMapper.deleteAssistPdfSearchZfbBaseById(id);
    }

    @Override
    public Integer insertSearchBaseList(List<AssistPdfSearchZfbBase> searchBaseList) {
        return assistPdfSearchZfbBaseMapper.insertSearchBaseList(searchBaseList);
    }
}
